import axios from '@/libs/request/axios'
// 分页获取产品模块数据
export const getProductListData = (params) => {
    return axios.request({
        url: '/product/productTemplate/queryTemplateList',
        data: params,
        method: 'post'
    })
}

 // 编辑产品模块设置有效
export const effective = (params) => {
    return axios.request({
        url: `/product/productTemplate/effective`,
        params: params,
        method: 'post'
    })
}
 // 编辑产品模块设置无效
export const invalid = (params) => {
    return axios.request({
        url: `/product/productTemplate/invalid`,
        params: params,
        method: 'post'
    })
}

// 获取产品模块信息
export const getProductTemplateInfo = (params) => {
    return axios.request({
        url: `/product/productTemplate/getProductTemplateInfo`,
        params: params,
        method: 'get'
    })
}
// 获取产品模块原子信息
export const getProductTemplateDetails = (params) => {
    return axios.request({
        url: `/product/productTemplateAtom/getProductTemplateDetails`,
        params: params,
        method: 'get'
    })
}
// 获取产品原子信息
export const getProductAtomDetails = (params) => {
    return axios.request({
        url: `/product/productAtom/getProductAtomicInformationList`,
        params: params,
        method: 'get'
    })
}
// 保存产品模板信息
export const saveOrUpdateTemplate = (params) => {
    return axios.request({
        url: `/product/productTemplate/saveOrUpdateTemplate`,
        params: params,
        method: 'post'
    })
}
// 查询产品模板信息
export const getListProductTemplate = (params) => {
    return axios.request({
        url: `/product/productTemplate/getListProductTemplate`,
        data: params,
        method: 'post'
    })
}

// 查询生效产品模板信息
export const getListProductTemplateEffective = (params) => {
    return axios.request({
        url: `/product/productTemplate/getListProductTemplateEffective`,
        data: params,
        method: 'post'
    })
}
